from django.db import models

# Create your models here.
# esp8266mod model includes name, uid, description, serial number and belongs to a instrument, verbose name for all fields are defined

class esp8266mod(models.Model):
    name = models.CharField(max_length=100, verbose_name='esp8266mod Name')
    uid = models.CharField(max_length=100, verbose_name='UID')
    description = models.TextField(null=True, blank=True, verbose_name='Description')
    instrument = models.ForeignKey('instrument.Instrument', on_delete=models.CASCADE, verbose_name='Instrument')

    def __str__(self):
        return self.name

    class Meta:
        verbose_name = 'esp8266mod'
        verbose_name_plural = 'esp8266mods'

    